const state = {
	id: '',
	username: '',
	name: '',
	birthday: '',
	mobilePhone: '',
	email: '',
	sex: '',
	description: '',
	image:'',
	nickName:''
};
const getters = {
	id: state => state.id,
	username: state => state.username,
	name: state => state.name,
	birthday: state => state.birthday,
	mobilePhone: state => state.mobilePhone,
	email: state => state.email,
	sex: state => state.sex,
	description: state => state.description,
	image: state => state.image,
	nickName: state => state.nickName
};
const mutations = {
	userInfo(state,payload){
		state.id = payload.id;
		state.name = payload.name;
		state.username = payload.username;
		state.mobilePhone = payload.mobilePhone;
		state.sex = payload.sex;
		state.birthday = payload.birthday;
		state.image = payload.image;
		state.email = payload.email;
		state.nickName = payload.nickName;
	}
};
const actions = {
	setUserInfo({commit,state},payload){
		console.log("payload====="+JSON.stringify(payload));
		commit('userInfo',payload);
	},
};
export default {
	namespaced: true, //用于在全局引用此文件里的方法时标识这一个的文件名
	state,
	getters,
	mutations,
	actions
}
